import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import ElementPlus from 'unplugin-element-plus/vite'

const path = require('path')

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    vue(),
    ElementPlus({}),
  ],
  build: {
    outDir: 'lib',
    lib: {
      name: 'Vue3Color',
      entry: path.resolve(__dirname, 'src/index.ts'),
      formats: ['umd', 'es'],
    },
  },
})
